package com.zatech.cgnci.project.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zatech.cgnci.project.vo.CgnciClaimSettlementVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
@ApiModel("分入结算DTO")
public class CgnciClaimSettlementDTO {

    @ApiModelProperty("立案号")
    private String caseNo;

    @ApiModelProperty("任务号")
    private String taskNo;

    @ApiModelProperty("结算ID(修改时必填)")
    private Long settlementId;

    @ApiModelProperty("结算号")
    private String settlementNo;

    @ApiModelProperty("案件ID")
    private Long caseId;

    @ApiModelProperty("结算类型(PREPAYMENT-预付结算 FINAL-结案结算)")
    @NotBlank(message = "结算类型不能为空")
    private String settlementType;

    @ApiModelProperty("汇率约定方式(1-按数值 2-按日期)")
    @NotBlank(message = "汇率约定方式不能为空")
    private String rateType;

    @ApiModelProperty("汇率日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date rateDate;

    @ApiModelProperty("汇率")
    //@NotNull(message = "汇率不能为空")
    @DecimalMin(value = "0", message = "汇率不能为负数")
    private BigDecimal rate;

    @ApiModelProperty("备注")
    private String remarks;

    @ApiModelProperty("公估费")
    private BigDecimal estimationAmount;

    @ApiModelProperty("摊赔金额")
    private BigDecimal compensationAmount;

    @ApiModelProperty("总计金额")
    private BigDecimal totalAmount;

    @ApiModelProperty("扩展信息")
    private Map<String, Object> extra;

    @ApiModelProperty("分入结算列表")
    private List<CgnciClaimSettlementVO.ReinsurerVO> intoSettlementList;

    @ApiModelProperty("转分摊回列表")
    private List<CgnciClaimSettlementVO.ReinsurerVO> spreadBackSettlementList;
}